$SRCDIR/ostree-setup.sh $(pwd)/ostree
fi
-rsync -a -H -v ${WORKDIR}/repo ${WORKDIR}/modules ${WORKDIR}/gnomeos-3.4-* ./ostree
+rsync -a -H -v ${WORKDIR}/repo ${WORKDIR}/current ${WORKDIR}/modules ${WORKDIR}/gnomeos-3.4-* ./ostree
current_uname=$(uname -r)
umount fs
rmdir fs
+ARGS="$@"
if ! echo $ARGS | grep -q 'ostree='; then
- ARGS="ostree=${BRANCH_PREFIX}runtime-current $ARGS"
+ ARGS="ostree=current $ARGS"
fi
ARGS="rd.plymouth=0 root=/dev/sda $ARGS"
KERNEL=/boot/vmlinuz-${current_uname}
if ! test -d /ostree/repo/objects; then
mkdir -p /ostree
- $SRCDIR/ostree-setup.sh /ostree
+ $SRCDIR/gnomeos-setup.sh /ostree
fi
ostree --repo=repo remote add origin http://ostree.gnome.org/repo
uname=$(uname -r)
-for branch in runtime devel; do
- rev=$(ostree --repo=$(pwd)/repo rev-parse ${BRANCH_PREFIX}${branch});
- if ! test -d ${BRANCH_PREFIX}${branch}-${rev}; then
- ostree --repo=repo checkout ${rev} ${BRANCH_PREFIX}${branch}-${rev}
- ostbuild chroot-run-triggers ${BRANCH_PREFIX}${branch}-${rev}
- fi
- rm -f ${BRANCH_PREFIX}${branch}-current
- ln -s ${BRANCH_PREFIX}${branch}-${rev} ${BRANCH_PREFIX}${branch}-current
-done
-rm -f current
-ln -s ${BRANCH_PREFIX}runtime-current current
+$SRCDIR/gnomeos-update-branches.sh
cd -
cp -ar /lib/modules/${uname} /ostree/modules/${uname}
initrd_name=initramfs-ostree-${uname}.img
-initrd_tmpdir=$(mktemp -d '/tmp/gnomeos-dracut.XXXXXXXXXX')
-linux-user-chroot \
+if ! test -f "/boot/${initrd_name}"; then
+ initrd_tmpdir=$(mktemp -d '/tmp/gnomeos-dracut.XXXXXXXXXX')
+ linux-user-chroot \
--mount-readonly / \
--mount-proc /proc \
--mount-bind /dev /dev \
--mount-bind /ostree/modules /lib/modules \
/ostree/${BRANCH_PREFIX}devel-current \
dracut -f /tmp/${initrd_name} "${uname}"
-mv "${initrd_tmpdir}/${initrd_name}" "/boot/${initrd_name}"
-rm -rf "${initrd_tmpdir}"
+ mv "${initrd_tmpdir}/${initrd_name}" "/boot/${initrd_name}"
+ rm -rf "${initrd_tmpdir}"
+fi
--- /dev/null
+#!/bin/sh
+# -*- indent-tabs-mode: nil; -*-
+# Set up ostree directory
+#
+# Copyright (C) 2011,2012 Colin Walters <walters@verbum.org>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+set -e
+set -x
+
+SRCDIR=`dirname $0`
+WORKDIR=`pwd`
+
+if test $(id -u) != 0; then
+ cat <<EOF
+This script should be run as root.
+EOF
+ exit 1
+fi
+
+usage () {
+ echo "$0 OSTREE_DIR_PATH"
+ exit 1
+}
+
+OSTREE_DIR_PATH=$1
+shift
+test -n "$OSTREE_DIR_PATH" || usage
+
+cd "$OSTREE_DIR_PATH"
+
+mkdir -p modules
+
+mkdir -p -m 0755 ./var/{log,run,tmp,spool}
+mkdir -p ./var/lib/dbus
+dbus-uuidgen > ./var/lib/dbus/machine-id
+
+mkdir -p ./var/tmp
+chmod 1777 ./var/tmp
+
+if ! test -L run; then
+ ln -s ../run run
+fi
+
+mkdir -p ./var/lib/gdm
+chown 2:2 ./var/lib/gdm
+
+touch ./var/shadow
+chmod 0600 ./var/shadow
+
+cat >./var/passwd << EOF
+root::0:0:root:/:/bin/sh
+dbus:*:1:1:dbus:/:/bin/false
+gdm:*:2:2:gdm:/var/lib/gdm:/bin/false
+EOF
+cat >./var/group << EOF
+root:*:0:root
+dbus:*:1:
+gdm:*:2:
+EOF
+
+if ! test -d repo; then
+ mkdir repo
+ ostree --repo=repo init
+fi
--- /dev/null
+#!/bin/sh
+#
+# Copyright (C) 2011,2012 Colin Walters <walters@verbum.org>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+set -e
+set -x
+
+ARCH=i686
+BRANCH_PREFIX="gnomeos-3.4-${ARCH}-"
+
+test -d repo || exit 1
+
+for branch in runtime devel; do
+ rev=$(ostree --repo=$(pwd)/repo rev-parse ${BRANCH_PREFIX}${branch});
+ if ! test -d ${BRANCH_PREFIX}${branch}-${rev}; then
+ ostree --repo=repo checkout ${rev} ${BRANCH_PREFIX}${branch}-${rev}
+ ostbuild chroot-run-triggers ${BRANCH_PREFIX}${branch}-${rev}
+ cp -ar /lib/modules/${uname} ${BRANCH_PREFIX}${branch}-${rev}/lib/modules/${uname}
+ fi
+ ln -sf ${BRANCH_PREFIX}${branch}-${rev} ${BRANCH_PREFIX}${branch}-current.new
+ mv ${BRANCH_PREFIX}${branch}-current{.new,}
+done
+ln -sf ${BRANCH_PREFIX}runtime-current current.new
+mv current.new current
+++ /dev/null
-# Copyright (C) 2011 Colin Walters <walters@verbum.org>
-#
-
-set -e
-set -x
-
-if test $(id -u) = 0; then
- cat <<EOF
-This script should not be run as root.
-EOF
- exit 1
-fi
-
-
-mkdir gnomeos-fs
-cd gnomeos-fs
-
+++ /dev/null
-#!/bin/sh
-# -*- indent-tabs-mode: nil; -*-
-# Set up ostree directory
-#
-# Copyright (C) 2011,2012 Colin Walters <walters@verbum.org>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the
-# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-set -e
-set -x
-
-SRCDIR=`dirname $0`
-WORKDIR=`pwd`
-
-if test $(id -u) != 0; then
- cat <<EOF
-This script should be run as root.
-EOF
- exit 1
-fi
-
-usage () {
- echo "$0 OSTREE_DIR_PATH"
- exit 1
-}
-
-OSTREE_DIR_PATH=$1
-shift
-test -n "$OSTREE_DIR_PATH" || usage
-
-cd "$OSTREE_DIR_PATH"
-
-mkdir -p modules
-
-mkdir -p -m 0755 ./var/{log,run,tmp,spool}
-mkdir -p ./var/lib/dbus
-dbus-uuidgen > ./var/lib/dbus/machine-id
-
-mkdir -p ./var/tmp
-chmod 1777 ./var/tmp
-
-if ! test -L run; then
- ln -s ../run run
-fi
-
-mkdir -p ./var/lib/gdm
-chown 2:2 ./var/lib/gdm
-
-touch ./var/shadow
-chmod 0600 ./var/shadow
-
-cat >./var/passwd << EOF
-root::0:0:root:/:/bin/sh
-dbus:*:1:1:dbus:/:/bin/false
-gdm:*:2:2:gdm:/var/lib/gdm:/bin/false
-EOF
-cat >./var/group << EOF
-root:*:0:root
-dbus:*:1:
-gdm:*:2:
-EOF
-
-if ! test -d repo; then
- mkdir repo
- ostree --repo=repo init
-fi